home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / Pascal / Applications / ircle 1.5.1 / source / ircle sources / MiscGlue.p < prev    next >
Encoding:
Text File  |  1993-10-07  |  2.1 KB  |  103 lines  |  [TEXT/PJMM]

  1. unit MiscGlue;
  2.  
  3. interface
  4.  
  5. {$IFC OLD_PASCAL}
  6. { Notification Manager glue - not needed on new compilers }
  7. type
  8.     NMRec = record
  9.             qLink: QElemPtr;   {next queue entry}
  10.             qType: INTEGER;    {queue type -- ORD(nmType) = 8}
  11.             nmFlags: INTEGER;    {reserved}
  12.             nmPrivate: LONGINT;    {reserved}
  13.             nmReserved: INTEGER;    {reserved}
  14.             nmMark: INTEGER;    {item to mark in Apple menu}
  15.             nmSIcon: Handle;     {handle to small icon}
  16.             nmSound: Handle;     {handle to sound record}
  17.             nmStr: StringPtr;  {string to appear in alert}
  18.             nmResp: ProcPtr;    {pointer to response routine}
  19.             nmRefCon: LONGINT;    {for application use}
  20.         end;
  21.     NMPtr = ^NMRec;
  22.  
  23. function NMInstall (nmReqPtr: QElemPtr): OSErr;
  24. inline
  25. $205F, $A05E, $3E80;
  26.  
  27. function NMRemove (nmReqPtr: QElemPtr): OSErr;
  28. inline
  29. $205F, $A05F, $3E80;
  30.  
  31. function SetCurrentA5: longint;
  32. inline
  33. $2E8D, $2A78, $0904;
  34.  
  35. function SetA5 (newA5: longint): longint;
  36. inline
  37. $2F4D, $0004, $2A5F;
  38.  
  39.  
  40. { (incomplete) Styled TextEdit glue - only needed on obsolete compilers }
  41.  
  42. const
  43. doFont = 1;
  44. doFace = 2;
  45. doSize = 4;
  46. doColor = 8;
  47. doAll = 15;
  48. addSize = 16;
  49.  
  50. type
  51. RGBColor = record
  52.         red, green, blue: integer
  53.     end;
  54.  
  55. ScrpSTElement = record
  56.         scrpStartChar: longint;
  57.         scrpHeight: integer;
  58.         scrpAscent: integer;
  59.         scrpFont: integer;
  60.         scrpFace: Style;
  61.         scrpSize: integer;
  62.         scrpColor: RGBColor
  63.     end;
  64. ScrpSTTable = array[0..0] of scrpSTElement;
  65.  
  66. StScrpHandle = ^StScrpPtr;
  67. StScrpPtr = ^StScrpRec;
  68. StScrpRec = record
  69.         scrpNStyles: integer;
  70.         scrpStyleTab: ScrpSTTable
  71.     end;
  72.  
  73. TextStyle = record
  74.         tsFont: integer;
  75.         tsFace: Style;
  76.         tsSize: integer;
  77.         tsColor: RGBColor
  78.     end;
  79.  
  80. function TEStylNew (destRect, viewRect: Rect): TEHandle;
  81. inline
  82. $A83E;  { _TEStylNew }
  83.  
  84. function GetStylScrap (hTE: TEHandle): StScrpHandle;
  85. inline
  86. $3F3C, $0006,        { move.w #6, -(sp) }
  87. $A83D;             { _TEDispatch }
  88.  
  89. procedure TEStylInsert (text: Ptr; length: longint; hST: stScrpHandle; hTE: TEHandle);
  90. inline
  91. $3F3C, $0007,     { move.w #7,-(sp) }
  92. $A83D;             { _TEDispatch }
  93.  
  94. procedure TESetStyle (mode: integer; newStyle: TextStyle; redraw: boolean; hTE: TEHandle);
  95. inline
  96. $3F3C, $0001,     { move.w #1,-(sp) }
  97. $A83D;             { _TEDispatch }
  98.  
  99. {$ENDC}
  100.  
  101. implementation
  102.  
  103. end.